package cn.edu.wynu.io;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;

public class FileLearn {
    public static void main(String[] args) throws IOException {
        // 绝对路径
        File file = new File("E:\\ZRKWorkspace\\ZrkJavaWorkspae\\JavaSeLearn\\src\\cn\\edu\\wynu\\io\\IOStartTest.java");
        System.out.println(file.length() + "字节（byte）");

        File myFile = new File("./myFile.txt");
        if (myFile.createNewFile()) {
            System.out.println("创建成功");
            myFile.delete();
        } else {
            System.out.println("创建失败");
        }
    }
}
